
var pai =13
var  seatData ={ 
    holds:[24, 25, 0, 6, 10, 2, 10, 13, 13, 10, 14, 4, 1]
}
if (seatData.holds) {
    var idx = seatData.holds.indexOf(pai);
    seatData.holds.splice(idx, 1);
  }


  let timeout=null;
// 马上执行函数  时间间隔内只执行一次
 const debounce=(func, delay)=> {
  if (!timeout) {
    func();
    timeout = setTimeout(()=>{
      clearTimeout(timeout);
      timeout=null
    }, delay);
  }
 
}

debounce(()=>{
    console.log( seatData.holds)
},500)
debounce(()=>{
    console.log( seatData.holds)
},500)
debounce(()=>{
    console.log( seatData.holds)
},500)